//package com.cloud.controller;
//
//import com.joyoung.common.controller.RestRes;
//import com.cloud.feign.resp.ProductBasicInfo;
//import com.cloud.resp.ProductTraceSourceDto;
//import com.cloud.service.AccessoryTraceabilityService;
//import com.cloud.service.ProductTraceSourceService;
//import io.swagger.annotations.*;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//
//@RestController
//@RequestMapping("/productTraceSource")
//@Api(value = "productTraceSource", tags = {"溯源成品信息查询"})
//@Slf4j
//public class ProductTraceSourceController {
//    @Resource
//    private ProductTraceSourceService productTraceSourceService;
//    @Resource
//    private AccessoryTraceabilityService accessoryTraceabilityService;
//
//    @ApiOperation(value = "通过产品码查询溯源成品信息", tags = {"溯源成品信息查询"}, nickname = "queryProductByBarCode")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "barCode", value = "产品码", paramType = "query", dataType = "String")
//    })
//    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功：000000，失败：其他")})
//    @GetMapping("/queryProductByBarCode")
//    public RestRes<ProductTraceSourceDto> queryProductByBarCode(@RequestParam("barCode") String barCode) throws Exception {
//        ProductTraceSourceDto productTraceSourceDto = productTraceSourceService.queryProductByBarCode(barCode);
//        log.info("queryProductByBarCode访问成功");
//        return RestRes.apiData(productTraceSourceDto);
//    }
//    @GetMapping("/queryLocalProductByBarCode")
//    public RestRes<Void> queryLocalProductByBarCode(@RequestParam("barCode") String barCode) {
//        ProductBasicInfo productBasicInfo = accessoryTraceabilityService.getProductBasicInfo(barCode);
//        log.info("queryProductByBarCode访问成功");
//        return RestRes.apiData(null);
//    }
//}
